package thread;

public class WaitrNotifyTest2 {
    public static void main(String[] args) {
        ThreadB2 b2 = new ThreadB2();
        b2.start();
        System.out.println("Total is:" + b2.total);
    }
}

class ThreadB2 extends Thread {
    int total;
    @Override
    public void run() {
        for (int i = 0; i < 100; i++) {
            total += i;
            System.out.println("_total:" + total);
        }
    }
}
